package cn.haohaowo.spring.chapter;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

public class HelloAbstractFactory {

	private static HelloAbstract helloAbstract;
	
	public static HelloAbstract getInitHelloAbstract() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
		return (HelloAbstract)Class.forName("cn.haohaowo.spring.chapter.HelloAbstract").newInstance();
	}
	
	@Test
	public void test() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
		getInitHelloAbstract().sayHello();
	}
	
}
